home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / os2 / sox_32.zip / SOXMAN.TXT < prev    next >
Text File  |  1992-10-30  |  15KB  |  309 lines

  1. SOX(1)              UNIX Programmer's Manual               SOX(1)
  2.  
  3.  
  4.  
  5. NAME
  6.      sox - SOund eXchange - universal sound sample translator
  7.  
  8. SYNOPSIS
  9.      sox infile outfile
  10.      sox infile outfile [ effect [ effect options ... ] ]
  11.      sox infile -e effect [ effect options ... ]
  12.      sox [ general options  ] [ format options  ] ifile [ format
  13.      options  ] ofile [ effect [ effect options ... ] ]
  14.      General options: [ -V ] [ -v volume ]
  15.      Format options: [ -t filetype ] [ -r rate ] [ -s/-u/-U/-A ]
  16.      [ -b/-w/-l/-f/-d/-D ] [ -c channels ] [ -x ]
  17.      Effects:
  18.              copy
  19.              rate
  20.              avg
  21.              stat
  22.              echo delay volume [ delay volume ... ]
  23.              vibro speed [ depth ]
  24.              lowp center
  25.              band [ -n ] center [ width ]
  26.  
  27. DESCRIPTION
  28.      Sox translates sound files from one format to another, pos-
  29.      sibly doing a sound effect.
  30.  
  31. OPTIONS
  32.      The option syntax is a little grotty, but in essence:
  33.              sox file.au file.voc
  34.      translates a sound sample in SUN Sparc .AU format into a
  35.      SoundBlaster .VOC file, while
  36.              sox -v 0.5 file.au -rate 12000 file.voc rate
  37.      does the same format translation but also lowers the ampli-
  38.      tude by 1/2 and changes the sampling rate from 8000 hertz to
  39.      12000 hertz via the rate sound effect loop.
  40.  
  41.      File type options:
  42.  
  43.      -t filetype
  44.                gives the type of the sound sample file.
  45.  
  46.      -r rate   Give sample rate in Hertz of file.
  47.  
  48.      -s/-u/-U/-A
  49.                The sample data is signed linear (2's complement),
  50.                unsigned linear, U-law (logarithmic), or A-law
  51.                (logarithmic).  U-law and A-law are the U.S. and
  52.                international standards for logarithmic telephone
  53.                sound compression.
  54.  
  55.      -b/-w/-l/-f/-d/-D
  56.                The sample data is in bytes, 16-bit words, 32-bit
  57.                longwords, 32-bit floats, 64-bit double floats, or
  58.                80-bit IEEE floats.  Floats and double floats are
  59.                in native machine format.
  60.  
  61.      -x        The sample data is in XINU format; that is, it
  62.                comes from a machine with the opposite word order
  63.                than yours and must be swapped according to the
  64.                word-size given above.  Only 16-bit and 32-bit
  65.                integer data may be swapped.  Machine-format
  66.                floating-point data is not portable.  IEEE floats
  67.                are a fixed, portable format. ???
  68.  
  69.      -c channels
  70.                The number of sound channels in the data file.
  71.                This may be 1, 2, or 4; for mono, stereo, or quad
  72.                sound data.
  73.  
  74.      General options:
  75.  
  76.      -e        after the input file allows you to avoid giving an
  77.                output file and just name an effect.  This is only
  78.                useful with the stat effect.
  79.  
  80.      -v volume Change amplitude (floating point); less than 1.0
  81.                decreases, greater than 1.0 increases.  Note: we
  82.                perceive volume logarithmically, not linearly.
  83.                Note: see the stat effect.
  84.  
  85.      -V        Print a description of processing phases.  Useful
  86.                for figuring out exactly how sox is mangling your
  87.                sound samples.
  88.  
  89.      The input and output files may be standard input and output.
  90.      This is specified by '-'.  The -t type option must be given
  91.      in this case, else sox will not know the format of the given
  92.      file.  The -t, -r, -s/-u/-U/-A, -b/-w/-l/-f/-d/-D and -x
  93.      options refer to the input data when given before the input
  94.      file name.  After, they refer to the output data.
  95.  
  96.      If you don't give an output file name, sox will just read
  97.      the input file.  This is useful for validating structured
  98.      file formats; the stat effect may also be used via the -e
  99.      option.
  100.  
  101. FILE TYPES
  102.      Sox needs to know the formats of the input and output files.
  103.      File formats which have headers are checked, if that header
  104.      doesn't seem right, the program exits with an appropriate
  105.      message.  Currently, the raw (no header), IRCAM Sound Files,
  106.      Sound Blaster, SPARC .AU (w/header), Mac HCOM, PC/DOS .SOU,
  107.      Sndtool, and Sounder, NeXT .SND, Windows 3.1 RIFF/WAV, and
  108.      Amiga/SGI AIFF and 8SVX formats are supported.
  109.  
  110.      .aiff     AIFF files used on Amiga and SGI.  Note: the AIFF
  111.                format supports only one SSND chunk.  It does not
  112.                support multiple sound chunks, or the 8SVX musical
  113.                instrument description format.  AIFF files are
  114.                multimedia archives and and can have multiple
  115.                audio and picture chunks.  You may need a separate
  116.                archiver to work with them.
  117.  
  118.      .au       SUN Microsystems AU files.  There are apparently
  119.                many types of .au files; DEC has invented its own
  120.                with a different magic number and word order.  The
  121.                .au handler can read these files but will not
  122.                write them.  Some .au files have valid AU headers
  123.                and some do not.  The latter are probably original
  124.                SUN u-law 8000 hz samples.  These can be dealt
  125.                with using the .ul format (see below).
  126.  
  127.      .hcom     Macintosh HCOM files.  These are (apparently) Mac
  128.                FSSD files with some variant of Huffman compres-
  129.                sion.  The Macintosh has wacky file formats and
  130.                this format handler apparently doesn't handle all
  131.                the ones it should.  Mac users will need your
  132.                usual arsenal of file converters to deal with an
  133.                HCOM file under Unix or DOS.
  134.  
  135.      .raw      Raw files (no header).
  136.                The sample rate, size (byte, word, etc), and style
  137.                (signed, unsigned, etc.) of the sample file must
  138.                be given.  The number of channels defaults to 1.
  139.  
  140.      .ub, .sb, .uw, .sw, .ul
  141.                These are several suffices which serve as a short-
  142.                hand for raw files with a given size and style.
  143.                Thus, ub, sb, uw, sw, and ul correspond to
  144.                "unsigned byte", "signed byte", "unsigned word",
  145.                "signed word", and "ulaw" (byte).  The sample rate
  146.                defaults to 8000 hz if not explicitly set, and the
  147.                number of channels (as always) defaults to 1.
  148.                There are lots of Sparc samples floating around in
  149.                u-law format with no header and fixed at a sample
  150.                rate of 8000 hz.  (Certain sound management
  151.                software cheerfully ignores the headers.) Simi-
  152.                larly, most Mac sound files are in unsigned byte
  153.                format with a sample rate of 11025 or 22050 hz.
  154.  
  155.      .sf       IRCAM Sound Files.
  156.                SoundFiles are used by academic music software
  157.                such as the CSound package, and the MixView sound
  158.                sample editor.
  159.  
  160.      .voc      Sound Blaster VOC files.
  161.                VOC files are multi-part and contain silence
  162.                parts, looping, and different sample rates for
  163.                different chunks.  On input, the silence parts are
  164.                filled out, loops are rejected, and sample data
  165.                with a new sample rate is rejected.  Silence with
  166.                a different sample rate is generated appropri-
  167.                ately.  On output, silence is not detected, nor
  168.                are impossible sample rates.
  169.  
  170.      .wav      Windows 3.1 .WAV RIFF files.
  171.                These appear to be very similar to IFF files, but
  172.                not the same.  They are the native sound file for-
  173.                mat of Windows 3.1.  Obviously, Windows 3.1 is of
  174.                such incredible importance to the computer indus-
  175.                try that it just had to have its own sound file
  176.                format.
  177.  
  178. EFFECTS
  179.      Only one effect from the palette may be applied to a sound
  180.      sample.  To do multiple effects you'll need to run sox in a
  181.      pipeline.
  182.  
  183.      copy                          Copy the input file to the
  184.                                    output file.  This is the
  185.                                    default effect if both files
  186.                                    have the same sampling rate,
  187.                                    or the rates are "close".
  188.  
  189.      rate                          Translate input sampling rate
  190.                                    to output sampling rate via
  191.                                    linear interpolation to the
  192.                                    Least Common Multiple of the
  193.                                    two sampling rates.  This is
  194.                                    the default effect if the two
  195.                                    files have different sampling
  196.                                    rates.  This is fast but
  197.                                    noisy.
  198.  
  199.      avg                           Mix 4- or 2-channel sound file
  200.                                    into 2- or 1-channel file by
  201.                                    averaging the samples for dif-
  202.                                    ferent speakers.
  203.  
  204.      stat                          Do a statistical check on the
  205.                                    input file, and print results
  206.                                    on the standard error file.
  207.                                    stat may copy the file
  208.                                    untouched from input to out-
  209.                                    put, if you select an output
  210.                                    file.  The "Volume Adjust-
  211.                                    ment:" field in the statistics
  212.                                    gives you the argument to the
  213.                                    -v number which will make the
  214.                                    sample as loud as possible.
  215.  
  216.      echo [ delay volume ...  ]    Add echoing to a sound sample.
  217.                                    Each delay/volume pair gives
  218.                                    the delay in seconds and the
  219.                                    volume (relative to 1.0) of
  220.                                    that echo.  If the volumes add
  221.                                    up to more than 1.0, the sound
  222.                                    will melt down instead of fad-
  223.                                    ing away.
  224.  
  225.      vibro speed  [ depth ]        Add the world-famous Fender
  226.                                    Vibro-Champ sound effect to a
  227.                                    sound sample by using a sine
  228.                                    wave as the volume knob.
  229.                                    Speed gives the Hertz value of
  230.                                    the wave.  This must be under
  231.                                    30.  Depth gives the amount
  232.                                    the volume is cut into by the
  233.                                    sine wave, ranging 0.0 to 1.0
  234.                                    and defaulting to 0.5.
  235.  
  236.      lowp center                   Apply a low-pass filter.  The
  237.                                    frequency response drops loga-
  238.                                    rithmically with center fre-
  239.                                    quency in the middle of the
  240.                                    drop.  The slope of the filter
  241.                                    is quite gentle.
  242.  
  243.      band [ -n ] center [ width ]  Apply a band-pass filter.  The
  244.                                    frequency response drops loga-
  245.                                    rithmically around the center
  246.                                    frequency.  The width gives
  247.                                    the slope of the drop.  The
  248.                                    frequencies at center + width
  249.                                    and center - width will be
  250.                                    half of their original ampli-
  251.                                    tudes.  Band defaults to a
  252.                                    mode oriented to pitched sig-
  253.                                    nals, i.e. voice, singing, or
  254.                                    instrumental music.  The -n
  255.                                    (for noise) option uses the
  256.                                    alternate mode for un-pitched
  257.                                    signals.  Band introduces
  258.                                    noise in the shape of the
  259.                                    filter, i.e. peaking at the
  260.                                    center frequency and settling
  261.                                    around it.
  262.  
  263.      Sox enforces certain effects.  If the two files have dif-
  264.      ferent sampling rates, the requested effect must be one of
  265.      copy, or rate, If the two files have different numbers of
  266.      channels, the avg effect must be requested.
  267.  
  268. BUGS
  269.      The syntax is horrific.  It's very tempting to include a
  270.      default system that allows an effect name as the program
  271.      name and just pipes a sound sample from standard input to
  272.      standard output, but the problem of inputting the sample
  273.      rates makes this unworkable.
  274.  
  275. FILES
  276. SEE ALSO
  277. NOTICES
  278.      The echoplex effect is:
  279.          Copyright (C) 1989 by Jef Poskanzer.
  280.  
  281.          Permission to use, copy, modify, and distribute this
  282.      software and its
  283.          documentation for any purpose and without fee is hereby
  284.      granted, provided
  285.          that the above copyright notice appear in all copies and
  286.      that both that
  287.          copyright notice and this permission notice appear in
  288.      supporting
  289.          documentation.  This software is provided "as is"
  290.      without express or
  291.          implied warranty.
  292.  
  293. ------------------------- Note headers follow --------------------------
  294. From postmaster%watson.vnet.ibm.com@yktvmv.watson.ibm.com  Fri Oct 30 10:19:38 1992
  295. Return-Path: <postmaster%watson.vnet.ibm.com@yktvmv.watson.ibm.com>
  296. Received: from yktvmv.watson.ibm.com by CONSULT1.watson.ibm.com (IBM OS/2 SENDMAIL 1.2.6/)
  297.           id AB0100; Fri, 30 Oct 92 10:19:38 -0500
  298. Received: from watson.vnet.ibm.com by yktvmv.watson.ibm.com (IBM VM SMTP V2R2)
  299.    with BSMTP id 4712; Fri, 30 Oct 92 10:19:36 EST
  300. Received: from YKTVMV by watson.vnet.ibm.com with "VAGENT.V1.0"
  301.           id <A.ADKINSG.NOTE.YKTVMV.8600.Oct.30.10:19:34.-0500>
  302.           for adkinsg@watson; Fri, 30 Oct 92 10:19:35 -0500
  303. Received: from sonata.cc.purdue.edu by watson.ibm.com (IBM VM SMTP V2R2)
  304.    with TCP; Fri, 30 Oct 92 10:19:33 EST
  305. Received: from symphony.cc.purdue.edu by sonata.cc.purdue.edu (5.61/Purdue_CC)
  306.         id AA05571; Fri, 30 Oct 92 10:14:48 -0500
  307. Received: by symphony.cc.purdue.edu (NX5.67c/NeXT-2.0)
  308.         id AA15680; Fri, 30 Oct 92 10:14:17 -0500
  309.